Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing assessments and assessmentsMetadata types #5649

Closed
wants to merge 2 commits into from

Conversation

chlahav
Copy link
Contributor

@chlahav chlahav commented Apr 15, 2019

Latest improvements:

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@chlahav chlahav added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required DoNotMerge <valid label in PR review process> use to hold merge after approval labels Apr 15, 2019
@AutorestCI
Copy link

AutorestCI commented Apr 15, 2019

Automation for azure-sdk-for-ruby

Encountered a Subprocess error: (azure-sdk-for-ruby)

Command: ['/usr/local/bin/autorest', '/tmp/tmp_fm5xnow/rest/specification/security/resource-manager/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmpg3p0nx4l']
Finished with return code 7
and output:

AutoRest code generation utility [version: 2.0.4283; node: v8.12.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Failure:
Error: Unable to start AutoRest Core from /root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core
Error: Unable to start AutoRest Core from /root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core
    at main (/opt/node_modules/autorest/dist/app.js:232:19)
    at <anonymous>

/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist/app.js:33
    autorest_core_1.Shutdown();
    ^
ReferenceError: autorest_core_1 is not defined
    at process.on (/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist/app.js:33:5)
    at emitOne (events.js:121:20)
    at process.emit (events.js:211:7)
    at process.emit (/node_modules/source-map-support/source-map-support.js:439:21)
fs.js:612
  return binding.close(fd);
                 ^

Error: EBADF: bad file descriptor, close
    at Object.fs.closeSync (fs.js:612:18)
    at StaticVolumeFile.shutdown (/opt/node_modules/autorest/dist/static-loader.js:352:10)
    at StaticFilesystem.shutdown (/opt/node_modules/autorest/dist/static-loader.js:406:17)
    at process.exit.n [as exit] (/opt/node_modules/autorest/dist/static-loader.js:169:11)
    at printErrorAndExit (/node_modules/source-map-support/source-map-support.js:423:11)
    at process.emit (/node_modules/source-map-support/source-map-support.js:435:16)
    at process._fatalException (bootstrap_node.js:391:26)

@AutorestCI
Copy link

AutorestCI commented Apr 15, 2019

Automation for azure-sdk-for-python

Encountered an unknown error: (azure-sdk-for-python)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
    return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
    rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
    sdk_tag=sdk_tag
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
    with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
    clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
    repo.git.checkout(branch_or_commit)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git checkout 322d3d62eb077ce48cbf2501ca4b7ecdf716da66
  stderr: 'fatal: reference is not a tree: 322d3d62eb077ce48cbf2501ca4b7ecdf716da66'

@AutorestCI
Copy link

AutorestCI commented Apr 15, 2019

Automation for azure-sdk-for-js

A PR has been created for you:
Azure/azure-sdk-for-js#2841

@AutorestCI
Copy link

AutorestCI commented Apr 15, 2019

Automation for azure-sdk-for-java

Nothing to generate for azure-sdk-for-java

@AutorestCI
Copy link

AutorestCI commented Apr 15, 2019

Automation for azure-sdk-for-go

Encountered an unknown error: (azure-sdk-for-go)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
    yield context
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
    return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
    rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
    sdk_tag=sdk_tag
  File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
    with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
    clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
  File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
    repo.git.checkout(branch_or_commit)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git checkout 322d3d62eb077ce48cbf2501ca4b7ecdf716da66
  stderr: 'fatal: reference is not a tree: 322d3d62eb077ce48cbf2501ca4b7ecdf716da66'

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@jhendrixMSFT
Copy link
Member

jhendrixMSFT commented Apr 15, 2019

@fearthecowboy I'm not sure what this modeler failure means, can you please elaborate? Oh ok I see, it's complaining because ResourceDetails contains no properties.

Copy link
Member

@jhendrixMSFT jhendrixMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following error needs to be fixed.
Swagger document contains two or more x-ms-enum extensions with the same name 'ReportedSeverity' and different values: Informational,Low,Medium,High vs. Compute,Network,Data,IdentityAndAccess,IoT

@chlahav
Copy link
Contributor Author

chlahav commented Apr 24, 2019

@jhendrixMSFT all you comments were resolved, can you please review again?

@jhendrixMSFT
Copy link
Member

@chlahav for SDK this looks good, still need ARM to sign off. Have these APIs been deployed? We can't merge until they're live.

@chlahav
Copy link
Contributor Author

chlahav commented Apr 28, 2019

@jhendrixMSFT these APIs are not exposed since we need ARM review to open them in the manifest.
after the ARM review we will expose the endpoint in the manifest, validate the quality and remove the DoNotMerge label so the PR will be completed

@dsgouda
Copy link
Contributor

dsgouda commented Apr 30, 2019

startbuild

adxsdknet added a commit to adxsdknet/azure-sdk-for-net that referenced this pull request Apr 30, 2019
REST Spec PR 'Azure/azure-rest-api-specs#5649'
REST Spec PR Author 'chlahav'
REST Spec PR Last commit
"type": "string",
"description": "Human readable description for the reason the assessment result status"
},
"additionalData": {
Copy link
Member

@majastrz majastrz May 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additionalData [](start = 9, length = 14)

Are these known ahead of time or completely arbitrary? #Closed

Copy link
Contributor Author

@chlahav chlahav May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completely arbitrary,
the set of additional data keys are decided per assessment (we have more than 50 assessments and growing) and currently the set is still changing for some of the assessments.
one day it might be more stable, but we will have more types than we can easily document #Closed

"description": "Details of the resource that was assessed",
"discriminator": "assessedResourceSource",
"properties": {
"assessedResourceSource": {
Copy link
Member

@majastrz majastrz May 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assessedResourceSource [](start = 9, length = 22)

This should probably be an enum that only allows "Azure" as the value if you're using it as a discriminator. #Closed

Copy link
Contributor Author

@chlahav chlahav May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, also added OnPremise value because one valued enum is not included in the .Net ctors and creates a breaking change when the new value is added.
we will add the relevant OnPremiseResourceDetails before the completion of this PR, but we still need to work on them #Closed

Copy link
Member

@majastrz majastrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you take a look at my comments and questions?

@majastrz majastrz added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label May 7, 2019
@Azure Azure deleted a comment from adxsdknet May 8, 2019
@dsgouda
Copy link
Contributor

dsgouda commented May 8, 2019

startbuild

adxsdknet added a commit to adxsdknet/azure-sdk-for-net that referenced this pull request May 8, 2019
REST Spec PR 'Azure/azure-rest-api-specs#5649'
REST Spec PR Author 'chlahav'
REST Spec PR Last commit
@adxsdknet
Copy link

adxsdknet commented May 8, 2019

Automation for azure-sdk-for-net

A PR has been created for you:
Azure/azure-sdk-for-net#6207
.NET SDK Commits:
adxsdknet/azure-sdk-for-net@3a36eb3
adxsdknet/azure-sdk-for-net@0914506

@chlahav
Copy link
Contributor Author

chlahav commented May 12, 2019

@majastrz the requested changes were pushed, can you please review?

adxsdknet added a commit to adxsdknet/azure-sdk-for-net that referenced this pull request May 12, 2019
REST Spec PR 'Azure/azure-rest-api-specs#5649'
REST Spec PR Author 'chlahav'
REST Spec PR Last commit
Copy link
Member

@majastrz majastrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@majastrz majastrz added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels May 13, 2019
@jhendrixMSFT
Copy link
Member

Now that #5929 has been merged into master can you please merge master into your fork to pick up those changes?

@jhendrixMSFT
Copy link
Member

@chlahav hello! What's the status of this PR?

@chlahav
Copy link
Contributor Author

chlahav commented Jul 2, 2019

@chlahav hello! What's the status of this PR?

we are still working on validating the API,
it is still not ready to public preview yet so we don't want to merge it

we will update this PR right beforehand to save you guys unnecessary reviews

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Jul 31, 2019

@jhendrixMSFT
Copy link
Member

@chlahav is this ready yet? also note there are several merge conflicts that need to be resolved.

@yungezz
Copy link
Member

yungezz commented Aug 15, 2019

@chlahav can we close the PR for now since you're not ready for merge, and the PR is over 4 months, there're lots of conflict with latest code base already. Pls create new PR when you're ready for review and merge.

@jhendrixMSFT
Copy link
Member

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review DoNotMerge <valid label in PR review process> use to hold merge after approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants